package com.ruoyi.common.core.domain.model;

import com.ruoyi.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * @version :
 * @program: easyBuy
 * @description: 用户名密码登陆
 * @author: 周爱鸿
 * @create: 2020-09-01 20:47
 **/

public class PasswordLoginBody {

	@ApiModel("app用户密码登陆model")
	@Data
	public static class Login{
		/**
		 * 用户名
		 */
		@ApiModelProperty("用户名/手机号")
		@NotEmpty(message = "登陆账号不能为空")
		private  String username ;
		/**
		 * 密码
		 */
		@ApiModelProperty("密码")
		@NotEmpty(message = "密码不能为空")
		private String password ;
	}
	@ApiModel("邮箱找回密码model")
	@Data
	public static class UpdatePassword{

		@ApiModelProperty("邮箱")
		@Email(message = "邮箱格式不正确")
		@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
		private String email ;

		@ApiModelProperty("验证码")
		@NotEmpty(message = "验证码不能为空")
		private String code ;

		@ApiModelProperty("密码")
		@NotEmpty(message = "密码不能为空")
		@Size(min = 6 , max = 20)
		private String password ;

	}

}
